//SnowballKillCommand.java
package qwq.vincentzyu.Command;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import qwq.vincentzyu.JPTTPlugin;

/**
 * Created by Administrator on 2025/3/13.
 */
public class SnowballKillCommand implements CommandExecutor {
    private final JPTTPlugin plugin;

    public SnowballKillCommand(JPTTPlugin plugin){
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length != 1) {
            sender.sendMessage("§a用法: /qwq_snowball_kill <true/false>");
            return true;
        }

        boolean arg0_enabled = Boolean.parseBoolean(args[0]);
        plugin.setSnowballKillEnabled(arg0_enabled);
        sender.sendMessage("§b雪球紫砂功能已 " + (arg0_enabled ? "§a启用" : "§c禁用"));
        return true;
    }
}
